3.102 \(\int \frac{\sec ^4(c+d x)}{a+i a \tan (c+d x)} \, dx\)

Optimal. Leaf size=34 \[ \frac{\tan (c+d x)}{a d}-\frac{i \tan ^2(c+d x)}{2 a d} \]

[Out]

Tan[c + d*x]/(a*d) - ((I/2)*Tan[c + d*x]^2)/(a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0431182, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.042, Rules used = {3487} \[ \frac{\tan (c+d x)}{a d}-\frac{i \tan ^2(c+d x)}{2 a d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4/(a + I*a*Tan[c + d*x]),x]

[Out]

Tan[c + d*x]/(a*d) - ((I/2)*Tan[c + d*x]^2)/(a*d)

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps

\begin{align*} \int \frac{\sec ^4(c+d x)}{a+i a \tan (c+d x)} \, dx &=-\frac{i \operatorname{Subst}(\int (a-x) \, dx,x,i a \tan (c+d x))}{a^3 d}\\ &=\frac{\tan (c+d x)}{a d}-\frac{i \tan ^2(c+d x)}{2 a d}\\ \end{align*}

Mathematica [A]  time = 0.163767, size = 35, normalized size = 1.03 \[ \frac{\sec (c+d x) (2 \sec (c) \sin (d x)-i \sec (c+d x))}{2 a d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4/(a + I*a*Tan[c + d*x]),x]

[Out]

(Sec[c + d*x]*((-I)*Sec[c + d*x] + 2*Sec[c]*Sin[d*x]))/(2*a*d)

________________________________________________________________________________________

Maple [A]  time = 0.054, size = 26, normalized size = 0.8 \begin{align*}{\frac{\tan \left ( dx+c \right ) -{\frac{i}{2}} \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{ad}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4/(a+I*a*tan(d*x+c)),x)

[Out]

1/d/a*(tan(d*x+c)-1/2*I*tan(d*x+c)^2)

________________________________________________________________________________________

Maxima [A]  time = 1.13882, size = 36, normalized size = 1.06 \begin{align*} -\frac{i \, \tan \left (d x + c\right )^{2} - 2 \, \tan \left (d x + c\right )}{2 \, a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+I*a*tan(d*x+c)),x, algorithm="maxima")

[Out]

-1/2*(I*tan(d*x + c)^2 - 2*tan(d*x + c))/(a*d)

________________________________________________________________________________________

Fricas [A]  time = 1.78664, size = 88, normalized size = 2.59 \begin{align*} \frac{2 i}{a d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+I*a*tan(d*x+c)),x, algorithm="fricas")

[Out]

2*I/(a*d*e^(4*I*d*x + 4*I*c) + 2*a*d*e^(2*I*d*x + 2*I*c) + a*d)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4/(a+I*a*tan(d*x+c)),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [A]  time = 1.15863, size = 36, normalized size = 1.06 \begin{align*} -\frac{i \, \tan \left (d x + c\right )^{2} - 2 \, \tan \left (d x + c\right )}{2 \, a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+I*a*tan(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(I*tan(d*x + c)^2 - 2*tan(d*x + c))/(a*d)